<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 构造函数
        function Stu(name) {
            this.name = name;
        }
        // 原型对象
        Stu.prototype.say = function () {
            console.log("错了");
        }
        //继承
        //类式继承
        function Man(n) {
                Stu.call(this, n) 

                this.age = 19 //多态
        }
       // 原型链继承
        Man.prototype = Stu.prototype;
         let o2 = new Man("my")
            console.log(o2)
    </script>
</body>

</html>